package com.quick.api.service;

import com.quick.api.config.DataSourceAnnotation;
import com.quick.api.mapper.TestMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author ：chicunxiang
 * @date ：Created in 2021/3/25 14:27
 * @description：
 * @version: 1.0
 */
@Service
public class TestService {

    @Autowired
    private TestMapper mTestMapper;


    @DataSourceAnnotation("1324567")
    public void queryStoreUser() {
        Integer i = mTestMapper.queryData();
        System.out.println("sub ===> " + i);
    }

    @DataSourceAnnotation("gogs")
    public void queryGogsUser() {
        Integer i = mTestMapper.queryData();
        System.out.println("gogs ===> " + i);
    }

    public void queryTestUser() {
        Integer i = mTestMapper.queryData();
        System.out.println("master ===> " + i);
    }

}
